using System;
using System.ComponentModel;
using System.ComponentModel.Design;

using System.Drawing;
using System.Drawing.Drawing2D;

namespace Camalon.Drawing
{
	/// <summary>
	/// Summary description for SolidFill.
	/// </summary>
	[ToolboxItem( true )]
	[ToolboxBitmap( typeof( ShapePen ), "Components.SolidFill.bmp")]
	public class SolidFill:ShapeFill
	{
		TransparentColor	_color;

//		public SolidFill(System.ComponentModel.IContainer container):this()
//		{
//			///
//			/// Required for Windows.Forms Class Composition Designer support
//			///
//			container.Add(this);
//
//		}

		public SolidFill():base(FillType.Solid)
		{
			System.Drawing.Color color = System.Drawing.Color.Red;
			_color = new TransparentColor(color);
		}
		
		public SolidFill(TransparentColor color ):base(FillType.Solid)
		{
			_color = color;
		}

		public  Brush GetBrush()
		{
				return new SolidBrush( _color );
		}

		#region Properties
		[Description("Color value of this SolidFill object.")]
		[DefaultValue( typeof( TransparentColor),"Red")]
		[RefreshProperties(RefreshProperties.All)]
		public TransparentColor Color
		{
			get
			{
				return _color;
			}
			set
			{
				if( _color.Equals( value)) return;
				_color = value;
				InvokeInternalChanged();
			}
		}
		#endregion Properties

	}
}
